<!--头部开始-->
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <title>通用后台管理系统</title>
    <meta name="referrer" content="never">
    <link rel="stylesheet" href="./layui/css/layui.css" />
    <script src="./layui/jquery-1.11.2.min.js"></script>
    <script src="./layui/layui.js"></script>
    <script>
        layui.use('element', function() {
            var element = layui.element;
            element.on('nav(demo)');
        });
    </script>
    <style>
        .layui-side{width:150px;}
        .layui-side-scroll{
            width:150px;
        }
        .layui-nav-tree{
            width:150px;
        }
        .layui-body{
            left:170px;
        }

        .logo{
            background-color:#2F4056;
            padding:10px 20px;
        }

        .site_h1{
            margin-bottom: 20px;
            line-height: 40px;
            color: #393D49;
            border-bottom: 1px solid #eee;
            font-size: 16px;
            font-weight: 300;
            float:left;width:100%;
        }
        .fl{
            float:left;
        }
        .fr{
            float:right;
        }
        .mr50{
            margin-right:50px;
        }
        .f12{
            font-size:12px;
        }
    </style>
</head>
<!--头部结束-->

<fieldset class="layui-elem-field layui-field-title" style="width:500px;margin:100px auto 20px;">
    <legend>管理后台</legend>
</fieldset>
<form class="layui-form" method="post" style="width:500px;margin: 10px auto;">
    <div class="layui-form-item">
        <label class="layui-form-label" style="text-align: center">账号</label>
        <div class="layui-input-block">
            <input type="text" name="account" lay-verify="required" autocomplete="off" placeholder="请输入管账号" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="text-align: center">密码</label>
        <div class="layui-input-block">
            <input type="password" name="pwd" lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="width:100%;text-align: center;">
            <button class="layui-btn" lay-submit="" lay-filter="formLogin" style="width:200px;">登录</button>
        </label>
    </div>
</form>
<script>
    layui.use('form',function(){
        var form = layui.form;
        form.on('submit(formLogin)', function(data){
            $.ajax({
                url:'#',
                data:data.field,
                dataType:'json',
                type:'post',
                success:function(res){
                    if(res.status == 0){
                        // 登陆成功跳转
                        window.location.href='#';
                    }else{
                        // 登陆失败提示
                        layer.msg(res.info,{icon:2});
                    }
                }
            });
            return false;
        });

    });
</script>
<!--内页结束-->
</body>
</html>